#ifndef _MYUTIL_H
#define _MYUTIL_H

#include<stdio.h>

/* these are really immutable, and are
 *   defined for symbolic convenience only
 * TRUE, FALSE, and ERR must be distinct
 * ERR must be < OK.
 */
#define TRUE		1
#define FALSE		0
/* system calls return this on success */
#define OK		0
/*   or this on error */
#define ERR		(-1)
/* turn this on to get '-x' code */
#ifndef DEBUGGING
#define DEBUGGING	FALSE
#endif

				/* NOTE: these correspond to DebugFlagNames,
				 *	defined below.
				 */
#define	DEXT		0x0001	/* extend flag for other debug masks */
#define	DSCH		0x0002	/* scheduling debug mask */
#define	DPROC		0x0004	/* process control debug mask */
#define	DPARS		0x0008	/* parsing debug mask */
#define	DLOAD		0x0010	/* database loading debug mask */
#define	DMISC		0x0020	/* misc debug mask */
#define	DTEST		0x0040	/* test mode: don't execute any commands */
#define	DBIT		0x0080	/* bit twiddling shown (long) */

#if DEBUGGING
# define Debug(mask, message)			\
  if ( (DebugFlags & (mask) ) == (mask) )	\
    printf message;
#else /* !DEBUGGING */
# define Debug(mask, message)			\
  ;
#endif /* DEBUGGING */

typedef unsigned char BYTE;
typedef unsigned int WORD;
typedef unsigned long DWORD;

#endif
